package com.wan.data.resource.model;

import java.lang.annotation.*;

/**
 * @author wwh
 * @date 2022/7/4 20:05
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ResourceModel {
    /** 名字，不带后缀 */
    String name() default "";
    /** 描述 */
    String desc() default "";
    /** 使用的缓存类型 */
    Class<? extends ModelCache> cache() default NormalCache.class;

    ResourceModel DEFAULT = new ResourceModel(){

        @Override
        public Class<? extends Annotation> annotationType() {
            return ResourceModel.class;
        }

        @Override
        public String name() {
            return "";
        }

        @Override
        public String desc() {
            return "";
        }

        @Override
        public Class<? extends ModelCache> cache() {
            return NormalCache.class;
        }
    };
}
